<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    *{
        padding: 0;
        margin: 0;
    }
    .b ul{
        display: flex;
        align-content: flex-start;
        list-style-type: none;
        text-align: center;
    }
    .b li{
        height: 50px;
        width: 80px; 
        background-color: #ffc0cb
    }
    .b a{
        text-decoration: none;
        font-size: 16px;
        line-height: 50px;
        height: 50px;
        width: 80px;
        color: rgb(255, 255, 255);
        display: inline-block;

    }
    .b li:hover{
        background-color: #008000;
    }
</style>
<body>
    <div class="b">
        <ul>
          <li><a href="#">新闻1</a></li>
          <li><a href="#">新闻2</a></li>
          <li><a href="#">新闻3</a></li>
          <li><a href="#">新闻4</a></li>
          <li><a href="#">新闻5</a></li>
          <li><a href="#">新闻6</a></li>
          <li><a href="#">新闻7</a></li>
          <li><a href="#">新闻8</a></li>
        </ul>
    </div>
</body>
</html>